package net.adetech.crj.service;

import net.adetech.crj.dao.AppointmentMapper;
import net.adetech.crj.entity.Appointment;
import net.adetech.crj.utils.InnerServiceUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("appointment.getListByApplyUserId")
public class GetAppointmentListByApplyUserIdService implements BaseService {

    @Autowired
    AppointmentMapper appointmentMapper;

    @Override
    public Map<String, Object> invoke(Map<String, Object> params) {
        String applyUserId = (String)params.get("applyUserId");
        List<Appointment> appointmentList = appointmentMapper.getAppointmentListByApplyUserId(applyUserId);
        return InnerServiceUtil.buildResult("appointmentList",appointmentList);
    }
}
